package com.mldong.holder;

/**
 * 校验组持有者
 */
public class ValidatorGroupHolder {
    private static final ThreadLocal<Class<?>> GROUP_THEAD_LOCAL = new ThreadLocal<>();

    /**
     * 设置当前校验组
     * @param vo
     */
    public static void set(Class<?> vo) {
        GROUP_THEAD_LOCAL.set(vo);
    }

    /**
     * 获取当前校验组
     * @return
     */
    public static Class<?> get() {
        return GROUP_THEAD_LOCAL.get();
    }

    /**
     * 删除校验组
     */
    public static void remove() {
        GROUP_THEAD_LOCAL.remove();
    }
}
